{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Here, we just want to see the RGB ,produced by TIFF image, and its corresponding mask image."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Display the RGB Picture & Its Mask"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from PIL import Image"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "image_id = 15 # Give the image ID"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "ResimAdi = 'RGB Files Path'+str(image_id)+'train.png'\n",
    "imggg = Image.open(ResimAdi).convert(\"L\")\n",
    "numpyResim = np.array(imggg) \n",
    "imggg.close()\n",
    "    \n",
    "ResimPATH = 'Mask Path'+str(image_id)+'mask.png'\n",
    "imggg = Image.open(ResimPATH)\n",
    "imgarr = np.array(imggg) \n",
    "imggg.close()\n",
    "\n",
    "fig = plt.figure(1, figsize = [20, 10], dpi = 200)\n",
    "plt.subplot(1,2,1)\n",
    "plt.imshow(imgarr)\n",
    "plt.subplot(1,2,2)\n",
    "plt.imshow(numpyResim)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
